﻿CREATE PROCEDURE RecordAmen
@BreadUrl nvarchar(40),
@UserId nvarchar(36),
@BreadName nvarchar(100),
@VerseId nvarchar(25)
AS
if not exists (select * from users where userid=@UserId)
begin
    insert into users (UserId) values (@UserId)
end
if not exists (select * from Bread where BreadUrl=@BreadUrl)
begin
    insert into Bread (BreadUrl, VerseId, BreadName) values
                      (@BreadUrl, @VerseId, @BreadName)
end